package Graphique;
import java.awt.BorderLayout;

import javaTrader.Historique;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import javax.swing.JTabbedPane;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JTextField;

import Graphique.menu.MenuHaut;



public class Fenetre extends JFrame {

	private MenuHaut menuHaut;
	private JPanel menuLaterale;
	private Centre onglet;
	
	public Fenetre(Historique historique) {
		
		//Initialisation de la fenetre
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setTitle("JavaTrader");
		setBounds(100, 100, 800, 500);
		
		//menu haut
		menuHaut = new MenuHaut();
		this.getContentPane().add(menuHaut, BorderLayout.NORTH);
		
		//Partie centrale
		
			//Affichage de la courbe
			onglet = new Centre(historique);
			
			//Menu laterale
			menuLaterale = new JPanel();
			
		JSplitPane midSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, menuLaterale, onglet);
		this.getContentPane().add(midSplit);
	}

	public Courbe getCourbe()
	{
		return this.onglet.getCourbe();
	}
}
